package demo2;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.net.Socket;
import java.net.UnknownHostException;

public class Client {
public static void main(String[] args) {
	try {
		Socket cs=new Socket("192.168.1.103", 8000);
		ObjectInputStream fis=new ObjectInputStream(cs.getInputStream());
		String ms=(String) fis.readObject();
		while(!ms.equals("bye")){
			System.out.println(ms);
			fis=new ObjectInputStream(cs.getInputStream());
			ms=(String) fis.readObject();
		}
	} catch (UnknownHostException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	} catch (IOException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	} catch (ClassNotFoundException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	
}
}
